package com.shsmi.jc.seed.common;

import com.fasterxml.jackson.annotation.JsonValue;

public enum ErrorCode {

    GLOBAL_DATA_NOT_EXIST(10001),
    AUTH_UNAUTHORIZED(20001),
    AUTH_JWT_TOKEN_EXPIRED(20002),
    AUTH_USERNAME_NOT_EXIST(20003),
    AUTH_PASSWORD_INVALID(20004),
    AUTH_USERNAME_CAN_NOT_BE_NULL(20005),
    USER_USERNAME_ALREADY_EXIST(20006);

    private Integer errorCode;

    private ErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    @JsonValue
    public Integer getErrorCode() {
        return errorCode;
    }
}
